Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change dropdown in Alert/Report modal to use javascript for conditional rendering instead of css #22360

Merged

Conversation

lyndsiWilliams
Copy link
Member

SUMMARY

This PR fixes an issue where the alert/report modal was rendering both the dashboard and chart dropdowns in the Message Content section. I fixed this by changing the dropdown conditional to use javascript instead of css.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:

arModalBefore

AFTER:

arModalAfter

TESTING INSTRUCTIONS

  • Go to settings -> Alerts & Reports
  • Click on the "+ALERT" button
  • Observe that there is only one dropdown under the "Message content" section
  • Select both "Dashboard" and "Chart" in this section and ensure that the appropriate dropdown is displayed

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@pull-request-size pull-request-size bot added size/L and removed size/M labels Dec 7, 2022
@lyndsiWilliams lyndsiWilliams added the need:qa-review Requires QA review label Dec 7, 2022
@lyndsiWilliams
Copy link
Member Author

/testenv up FEATURE_ALERT_REPORTS=true

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2022

@lyndsiWilliams Ephemeral environment spinning up at http://54.202.30.24:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@lyndsiWilliams
Copy link
Member Author

@jinghua-qa Could you do some QA testing on this to make sure everything looks right?

@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Merging #22360 (0fe50f6) into master (04b7a26) will increase coverage by 0.02%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master   #22360      +/-   ##
==========================================
+ Coverage   66.86%   66.88%   +0.02%     
==========================================
  Files        1846     1847       +1     
  Lines       70510    70604      +94     
  Branches     7723     7755      +32     
==========================================
+ Hits        47144    47225      +81     
- Misses      21364    21372       +8     
- Partials     2002     2007       +5     
Flag Coverage Δ
hive 52.53% <ø> (ø)
javascript 53.87% <66.66%> (+0.08%) ⬆️
mysql 77.96% <ø> (ø)
postgres 78.02% <ø> (ø)
presto 52.42% <ø> (ø)
python 81.24% <ø> (ø)
sqlite 76.49% <ø> (ø)
unit 50.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...frontend/src/views/CRUD/alert/AlertReportModal.tsx 52.79% <66.66%> (+0.70%) ⬆️
...d/src/views/CRUD/data/dataset/AddDataset/index.tsx 51.61% <0.00%> (-8.39%) ⬇️
superset-frontend/src/views/CRUD/data/hooks.ts 57.69% <0.00%> (-5.95%) ⬇️
...a/dataset/AddDataset/DatasetPanel/DatasetPanel.tsx 87.23% <0.00%> (-4.44%) ⬇️
...ts/nativeFilters/FilterBar/ActionButtons/index.tsx 75.00% <0.00%> (-3.58%) ⬇️
...nts/controls/DateFilterControl/DateFilterLabel.tsx 55.31% <0.00%> (-2.83%) ⬇️
...omponents/nativeFilters/FilterBar/Header/index.tsx 94.59% <0.00%> (-0.65%) ⬇️
...rontend/src/components/DropdownContainer/index.tsx 72.28% <0.00%> (-0.56%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 41.07% <0.00%> (-0.20%) ⬇️
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 3.33% <0.00%> (-0.04%) ⬇️
... and 17 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jinghua-qa
Copy link
Member

LGTM!

@lyndsiWilliams lyndsiWilliams merged commit 49f1cfc into apache:master Dec 8, 2022
@lyndsiWilliams lyndsiWilliams deleted the lyndsi/fix-alertreportmodal-dropdowns branch December 8, 2022 00:24
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2022

Ephemeral environment shutdown and build artifacts deleted.

jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Dec 10, 2022
…itional rendering instead of css (apache#22360)

(cherry picked from commit 49f1cfc)
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels need:qa-review Requires QA review preset:2022.49 size/L 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants